<div id="debug">
<ul>
<?php foreach (Db_mysqli::$query_stack as $query):?>
    <li><?php echo $query;?></li>
<?php endforeach;?>
</ul>
</div>